<%@ page language="java" pageEncoding="utf-8"%>
<html>
<head>
	<style type="text/css">
	BODY,TD {FONT-FAMILY: "宋体"; FONT-SIZE: 10pt;line-height: 15px} 
	</style>
	<title>选择</title>
	<script type="text/javascript" src="js/public.js"></script>
    <script language="javascript" type="text/javascript">
      function CloseWind(){        
        parent.hiddenFrm();
      }
    
    function choiceRow(){       
    var str;           
	var stockTable=document.getElementById("stockTable");	                                        	
	var checks=document.getElementsByName("check");
	var str="";
	var txt1;	
	for(var i=checks.length-1;i>=0;i--){
	    txt1="";
		if(checks[i].checked){
           var index =checks[i].parentNode.parentNode.rowIndex;
           var indexc=checks[i].parentNode.cellIndex;                                            
           txt1 = document.getElementById('stockTable').rows[index].cells[indexc+1].innerHTML;                                                                      
		}		
		if(txt1!=""){
			if(str==""){
			   str=txt1;
			}else{
			   str=str+","+txt1;
			}		
		}		
	}		
	parent.setmValue(str);
    parent.hiddenFrm();   
    }  



    </script>
</head>
<body>
	<form method="post" name="form1">
		<fieldset>
		<table width=70% id="stockTable">
		
		<tr>
		    <td>流向传输情况:</td>
			<td><input type="checkbox" name="check" value="采购"/></td>
			<td id="sid1">采购</td>
			<td><input type="checkbox" name="check" value="销售"/></td>
			<td id="sid1">销售</td>
			<td><input type="checkbox" name="check" value="库存"/></td>
			<td id="sid1">库存</td>
		</tr>						
		</table>
		<table width="100%" border="0">
		<tr>
			<td width="20">&nbsp;</td>
			<td><input type="button" value="确定" onclick="choiceRow();"></td>
			<td width="20">&nbsp;</td>
			<td><input type="button" value="关闭" onclick="CloseWind();"></td>	
		</tr>	
		</table>
		</fieldset>
	</form>
</body>
</html>
